<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>流式布局</title>
    <style>
        .con {
            width: 400px;
            height: 400px;
            background-color: white;
            display: flex;
            flex-wrap: wrap;
            align-content: flex-start;
        }
        .child {
            box-sizing: border-box;
            width: 100px;
            height: 100px;
            background-color: #fff;
            border: 1px solid gray;
            margin-left: -1px;
            margin-top: -1px;
            position: relative;
        }
        .child:hover {
            border: 1px solid red;
            z-index: 1;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
    </div>
</body>
</html>